package com.edais.persistence;

import java.util.List;
import java.util.Map;

import com.edais.domain.SalesmanMonthRecord;
import com.edais.domain.SalesmanRecord;

public interface KcodeChannelMapper {

	public Map<String, Object> selectCardNo(Map<String, Object> parmMap)throws Exception;
	
	public Map<String, Object> getKeycodeChannel(Map<String, Object> parmMap)throws Exception;

	public Map<String, Object> selectTimeCardNo(Map<String, Object> parmMap)throws Exception;

	public List<String> queryParamName(Map<String, String> parammap);

	public int addVoucher(Map<String, Object> map);
	
	public List<Map<String, Object>> queryVoucherRule(Map<String, Object> map);
	
	public void updateActivityAreaInfo(Map<String, Object> params);

	public void updateActivityGpsInfo(Map<String, Object> params) throws Exception;
	
	/**
	 * 查询会员表信息
	 * @Description: TODO
	 * @param  memberMap
	 * @param @return
	 * @param @throws Exception   
	 * @return List<Map<String,Object>>  
	 * @throws
	 * @author wuhan
	 * @date 2016-8-24
	 */
	public List<Map<String, Object>> queryMemberInfoList(Map<String,Object> memberMap) throws Exception;
	
	/**
	 * 添加销售人员返佣记录信息
	 * @Description: TODO
	 * @param @param memberMap
	 * @param @throws Exception   
	 * @return void  
	 * @throws
	 * @author wuhan
	 * @date 2016-8-24
	 */
	public void addSalesmanRecord(Map<String,Object> memberMap) throws Exception;
	
	
	/**
	 * 根据月份查询返佣信息
	 * @Description: TODO
	 * @param @param memberMap
	 * @param @return
	 * @param @throws Exception   
	 * @return List<Map<String,Object>>  
	 * @throws
	 * @author wuhan
	 * @date 2016-8-25
	 */
	public List<SalesmanRecord>  querySaleManRecordListByDate(Map<String,Object> memberMap) throws Exception;
	
	/**
	 * 根据月份查询返佣信息总数
	 * @Description: TODO
	 * @param @param memberMap
	 * @param @return
	 * @param @throws Exception   
	 * @return int  
	 * @throws
	 * @author wuhan
	 * @date 2016-8-29
	 */
	public int querySaleManRecordListByDateCount(Map<String,Object> memberMap) throws Exception;
	
	
	/**
	 * 统计销售人员每月销售数据
	 * @Description: TODO
	 * @param @param memberMap
	 * @param @return
	 * @param @throws Exception   
	 * @return List<SalesmanMonthRecord>  
	 * @throws
	 * @author wuhan
	 * @date 2016-9-1
	 */
	public List<SalesmanMonthRecord> querySalesmanMonthRecord(Map<String,Object> memberMap) throws Exception;
	
	
	/**
	 * 统计销售人员每月销售数据总数
	 * @Description: TODO
	 * @param @param memberMap
	 * @param @return
	 * @param @throws Exception   
	 * @return int  
	 * @throws
	 * @author wuhan
	 * @date 2016-9-1
	 */
	public int querySalesmanMonthRecordCount(Map<String,Object> memberMap) throws Exception;
	
	/**
	 * @Description 查询不可激活的k码
	 * @param params
	 * @return int
	 * @throws Exception
	 * @author wuhan
	 * @date 2016-11-14
	 */
	public int selectIllegal(Map<String,Object> params) throws Exception;

	/**
	 * 查询卡号是否存在
	 * @param cardNo
	 * @return int
	 */
	int queryKeyCodeCountByCardNo(String cardNo);
	
	/**
	 * 查询渠道是否存在
	 * @param param 渠道id 渠道名称
	 * @return int
	 */
	int queryChannelCountByParam(Map<String, Object> param);
	
	/**
	 * 删除无效k码记录表
	 * @param cardNo
	 * @return int
	 */
	int updateKcodeIllegalByCardNo(String cardNo);
	
	/**
	 * 添加k码信息
	 * @param param
	 * @return int
	 */
	int insertKeycodeInfo(Map<String, Object> param);
	
	
}
